package org.example.service.impl;

import org.example.mapper.NoiseMapper;
import org.example.pojo.Noise;
import org.example.pojo.NoiseCategory;
import org.example.service.NoiseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoiseServiceImpl implements NoiseService {
    @Autowired
    private NoiseMapper noiseMapper;
    
    @Override
    public List<Noise> getAllNoises() {
        return noiseMapper.selectAll();
    }
    
    @Override
    public List<Noise> getNoisesByCategory(Integer categoryId) {
        return noiseMapper.selectByCategoryId(categoryId);
    }
    
    @Override
    public List<NoiseCategory> getAllCategories() {
        return noiseMapper.selectAllCategories();
    }
} 